import os
Import ("*")

lib_name = "bs_mtx"
tar_name = "bs_mtx"

env = custom_env.Clone ()
env.Append (CPPPATH = ["include","src", includes["bs_bos_core_base"]] + includes["kernel"])

if ("cfl" in env and env["cfl"] == "1") :
	env.AppendUnique (CPPDEFINES = ["BS_BOS_CORE_USE_CSR_ILU_CFL_PREC"])

if (build_kind == "debug") :
    env.AppendUnique (LIBS = ["blue_sky_d"])
    lib_name += "_d"
elif (build_kind == "release") :
    env.AppendUnique (LIBS = ["blue_sky"])

bs_mtx = env.SharedLibrary (target = os.path.join (tar_exe_plugin_dir, lib_name), source = files (["."]).sources)

env.Alias (tar_name, bs_mtx)
Export ("bs_mtx")

if (env["install"] == 1) :
    inst_tar = env.Install ("$plugins_prefix", bs_mtx)
    env.Alias (tar_name, inst_tar)
